﻿function copyToClipboard(val) {
	window.clipboardData.clearData('Text');
	window.clipboardData.setData('Text', val);
}
function getText(element) {
	if (element.value != undefined) {
		return $(element).val();
	}
	else if (element.innerText != undefined) {
		return element.innerText;
	}
	else {
		return $(element).text();
	}
}
function setText(element, text) {
	if (element.value != undefined) {
		$(element).val(text);
	}
	else if (element.innerText != undefined) {
		element.innerText = text;
	}
	else {
		$(element).css('white-space', 'pre-line');
		$(element).text(text);
	}
}